﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace Hutech.Authentication.Library.Helper
{
    public static class UIhelper
    {
        public static void DisableButtonAfterClick(
        WebControl button,
        string disabledText,
        string postbackEventReference)
        {
            if (button == null)
                return;
            button.Attributes.Add("onclick", "this.value='"
            + disabledText
            + "';this.disabled = true;"
            + postbackEventReference);
        }
    }
}
